package com.haust.su.ghyy.hospital.repository;

import com.haust.su.ghyy.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author haustsusu
 * @create 2023-04-26-12:16
 * 创建Hospitalrepository接口,继承MongoDBrepository
 */
//交给spring管理
@Repository
public interface Hospitalrepository extends MongoRepository<Hospital,String> {
    //根据hoscode判断是否存在数据
    Hospital getHospitalByHoscode(String hoscode);

    //根据医院名称做模糊查询
    List<Hospital> findHospitalByHosnameLike(String hosname);
}
